from enum import Enum

from pydantic import BaseModel, Field


class UserRegisterRequest(BaseModel):
    """用户注册请求数据格式"""
    username: str = Field(..., min_length=3, max_length=20)
    password: str = Field(..., min_length=3, max_length=20)
    email: str = Field(..., min_length=3, max_length=20)
    code: str = Field(..., min_length=6, max_length=6)


class UserRegisterResponse(BaseModel):
    """用户注册响应数据格式"""
    id: int
    username: str
    email: str


